package main

import (
	"learn-go/16.crawler2/engine"
	"learn-go/16.crawler2/scheduler"
	"learn-go/16.crawler2/zhenai/parser"
)

func main() {
	// #2
	//e := engine.ConcurrentEngine{
	//	Scheduler:   &scheduler.SimpleScheduler{},
	//	WorkerCount: 10,
	//}

	e := engine.ConcurrentEngine{
		Scheduler:   &scheduler.QueuedScheduler{},
		WorkerCount: 10,
	}

	e.Run(engine.Request{
		Url:        "http://www.zhenai.com/zhenghun",
		ParserFunc: parser.ParseCityList,
	})
}
